#ifndef CFONTCONFIGDIALOG_H
#define CFONTCONFIGDIALOG_H

#include "customtoolbutton.h"

#include <QWidget>
#include <QFont>
#include <QSpinBox>
#include <QFontComboBox>


class CFontConfigDialog : public QWidget
{
    Q_OBJECT
public:
    explicit CFontConfigDialog(QWidget *parent = nullptr);

    void SetFont(QFont font);

signals:
    void FontChanged(const QFont &font);
public slots:
    void FontChangedSlot(const QFont &font);
    void FontPointSizeChangedSlot(int val);
    void FontBoldChanged(bool isChecked);
    void FontItalicChanged(bool isChecked);
    void FontUnderlineChanged(bool isChecked);
    void FontStrikeoutChanged(bool isChecked);
    //member func
private:
    void Init();
    //member
private:
    QFont m_font;
    QSpinBox m_FontSizeWdiget;
    QFontComboBox m_fontFamilyComboBox;
    CCustomToolButton m_BoldButton;
    CCustomToolButton m_ItalicButton;
    CCustomToolButton m_UnderlineButton;
    CCustomToolButton m_StrikeOutButton;
};

#endif // CFONTCONFIGDIALOG_H
